package net.mysoft.budgetsoft.system.domain;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * 
 * @author dagongPGP v1.0
 * @link <a href=http://www.mysoft.net>北京大公信软科技有限公司</a>
 * 
 * @version $Revision: 1.00 $Date: 2013-12-27 14:09:49
 */
//@Entity
//@Table(name = "JueSe")
public class TJueSe implements java.io.Serializable {
	private String bianHao;
	private String jueSeMC;
	private Integer zhuangTai;
	private java.util.Date chuangJianSJ;
	private Integer shunXu;
	private Set<TYongHuJS> tYongHuJSSet;

	@Id
	@GeneratedValue(generator = "IDGenerator")
	@GenericGenerator(name = "IDGenerator", strategy = "net.mysoft.framework.util.IDGenerator", 
			parameters = { @Parameter(value = "SEQ_JueSe", name = "seq") })
	@Column(name = "BianHao", unique = true, nullable = false)
	public String getBianHao() {
		return this.bianHao;
	}

	public void setBianHao(String bianHao) {
		this.bianHao = bianHao;
	}

	@Column(name = "JueSeMC")
	public String getJueSeMC() {
		return this.jueSeMC;
	}

	public void setJueSeMC(String jueSeMC) {
		this.jueSeMC = jueSeMC;
	}
	
	@Column(name="ZhuangTai")
    public Integer getZhuangTai(){
    	return this.zhuangTai;
    }
    
    public void setZhuangTai(Integer zhuangTai){
    	this.zhuangTai = zhuangTai;
    }
    
	@Column(name = "ChuangJianSJ")
	public java.util.Date getChuangJianSJ() {
		return this.chuangJianSJ;
	}

	public void setChuangJianSJ(java.util.Date chuangJianSJ) {
		this.chuangJianSJ = chuangJianSJ;
	}

	@Column(name = "ShunXu")
	public Integer getShunXu() {
		return this.shunXu;
	}

	public void setShunXu(Integer shunXu) {
		this.shunXu = shunXu;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tJueSe")
	public Set<TYongHuJS> gettYongHuJSSet() {
		return tYongHuJSSet;
	}

	public void settYongHuJSSet(Set<TYongHuJS> tYongHuJSSet) {
		this.tYongHuJSSet = tYongHuJSSet;
	}

	@Override
	public int hashCode() {
		int prime = 0;
		prime += this.getBianHao().hashCode();
		return prime;
	}

	@Override
	public boolean equals(Object obj) {
		boolean isEquals = false;
		if (obj != null && this.getClass() == obj.getClass()) {
			TJueSe clazz = (TJueSe) obj;
			if (clazz.getBianHao().equals(this.getBianHao()))
				isEquals = true;
			return isEquals;
		}
		return isEquals;
	}

}